from django.db import models


# Create your models here.
# class Detail(models.Model):
#     content = models.TextField(verbose_name='内容')
#     def __str__(self):
#         return self.content

class Bowen(models.Model):
    """博文简介"""
    title = models.CharField(max_length=32, verbose_name='标题', unique=True)
    postdate = models.DateTimeField(verbose_name='发布时间')
    imgurl = models.URLField(max_length=200, verbose_name='图片的地址',default='')
    content = models.TextField(verbose_name='内容')
    fenlei_choices = (
        (1, 'Django'),
        (2, 'Vue'),
        (3, 'Ajax'),
        (4,'随记'))
    fenlei = models.SmallIntegerField(verbose_name='类型', choices=fenlei_choices, default=1)
    zishu = models.IntegerField(verbose_name='字数',default=1)
    class Meta:
        app_label = 'bowen'
